package com.crm.customers.dao;

import java.util.List;

import com.crm.customers.model.ContractPerformance;


public interface ContractPerformanceDao {
	
	/**
	 * 插入业绩记录
	 * */
	public ContractPerformance insertContractPerformance(ContractPerformance cp);
	
	/**
	 * 检测记录是否已经存在
	 * */
	public List<ContractPerformance> checkIsExist(Long conid);
	
	/**
	 * 修改业绩记录(删除设置isdel=0)
	 * */
	public int updataContractPerformance(ContractPerformance cp);
	/**
	 * 删除业绩
	 * @param conid
	 * @return
	 */
	public int deleteContractPerformance(Long conid);
	/**
	 * 根据UID查出每个月的业绩
	 * @param uid
	 * @return
	 */
	public List<ContractPerformance> getPerFormanceByUid(Long uid);
	
	/**
	 * 获取当天业绩金额
	 * @param uid
	 * @return
	 */
	public int selDayPerformanceByUid(Long uid);
	
	/**
	 * 查出当月所有人的业绩排行
	 * @param uid
	 * @return
	 */
	public List<ContractPerformance> selAllUserPerformance();
	
}
